<?php
namespace app\admin\validate;
use think\Validate;

/**
 * 分部信息验证器
 * Created by PhpStorm.
 * User: tyll
 * Date: 2019/09/17
 * Time: 10:00
 */
class Branch extends Validate{

    protected $rule = [
        'name'   => 'require'
    ];

    protected $message = [
        'name.require'   => '分部名称必须填写'
    ];

    protected $scene = [
        'add'  => ['name'],
        'edit' => ['name']
    ];
}